package com.example.cache_demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;

/**
 *
	 CREATE TABLE user(
	 `id` bigint(20) NOT NULL COMMENT '主键',
	 `name` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '姓名',
	 `age` int(11) NOT NULL,
	 `address` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '地址',
	 PRIMARY KEY (`id`) USING BTREE
	 )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='用户表';
 */

@SpringBootApplication
@Slf4j
@EnableCaching //开启缓存注解功能
public class CacheDemoApplication {

	public static void main(String[] args) {
		try {
			SpringApplication.run(CacheDemoApplication.class, args);
			log.info("项目启动成功");
		} catch (Exception e) {
			e.printStackTrace();
			log.info("项目启动失败");
		}
	}

}
